<?php
/**
 * @copyright	Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

include_once (dirname(__FILE__).DS.'/ja_vars.php');

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">

<head>
<jdoc:include type="head" />
<?php JHTML::_('behavior.mootools'); ?>
<?php JHTML::_('behavior.modal'); ?>

<link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $tmpTools->baseurl(); ?>templates/system/css/general.css" type="text/css" />
<!--<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/template.css" type="text/css" />-->
<link rel="stylesheet" href="<?php echo $tmpTools->templateurl(); ?>/css/vita.css" type="text/css" />

<?php
$lang =& JFactory::getLanguage();
$locales = $lang->getLocale();
if(strstr($locales[0],'vi'))
{
?>
<link rel="stylesheet" type="text/css" href="<?php echo $tmpTools->templateurl(); ?>/css/lang_vn.css" media="screen" />
<?php
} 
?>
<link rel="stylesheet" type="text/css" href="<?php echo $tmpTools->templateurl(); ?>/css/print.css" media="print" />    
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/ja.script.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/dw_event.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/dw_scroll.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/dw_scrollbar.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/scroll_controls.js"></script>
<!--[if IE 7.0]>
<style type="text/css">
.clearfix {display: inline-block;}
</style>
<![endif]-->
<?php if ($tmpTools->isIE6()): ?>
<!--[if lte IE 6]>
<script type="text/javascript">
var siteurl = '<?php echo $tmpTools->baseurl();?>';

window.addEvent ('load', makeTransBG);
function makeTransBG() {
	fixIEPNG($E('.ja-headermask'), '', '', 1);
	fixIEPNG($E('h1.logo a'));
	fixIEPNG($$('img'));
	fixIEPNG ($$('#ja-mainnav ul.menu li ul'), '', 'scale', 0, 2);
}
</script>
<style type="text/css">
.ja-headermask, h1.logo a, #ja-cssmenu li ul { background-position: -1000px; }
#ja-cssmenu li ul li, #ja-cssmenu li a { background:transparent url(<?php echo $tmpTools->templateurl(); ?>/images/blank.png) no-repeat right;}
.clearfix {height: 1%;}
</style>
<![endif]-->
<?php endif; ?>
</head>
<body>
<?php
$class=""; 
if(!$tmpTools->isFrontPage())
{
 $class="class=\"details timescape\"";
} 
?> 
<div id="wrapContainer">
    <div id="container" <?php echo $class;?> >
        <div id="header">
            <ul class="top">
                <li><h1><a href="#" title="Taylor Made"><img src="<?php echo $tmpTools->templateurl(); ?>/images/vita/logo.jpg" alt="taylor" height="85" width="207"/></a></h1></li>
                <li class="midd"><h2 class="titRed">Learning Community</h2></li>
                <li class="last">
                    <h3><?php echo JText::_('LOGIN');?></h3>
                    <?php if($this->countModules('user4')) : ?>
                    <div id="ja-search">
                        <jdoc:include type="modules" name="user4" />
                    </div>
                    <?php endif; ?>
                </li>
            </ul>
            <p class="lnkVita"><a href="#" title="Vita"></a></p>
            <div class="bot">            
                <ul class="nav">                
                    <li class="first"><img src="<?php echo $tmpTools->templateurl(); ?>/images/vita/dummy.gif" alt="" class="uiIcon initIcon-07"/></li>                    
                    
                        <jdoc:include type="modules" name="hornav" />
                                         
                </ul>
                <jdoc:include type="modules" name="user5" />
            </div>            
        </div><!--EOF header-->

        <!-- BEGIN: CONTENT -->

                <div id="wrapMain"  class="cntVita">
                <div class="main">

               <div class="leftCtn">
                	<div class="blckHightlight">
                    	<h3><span><span><?php echo JText::_('HOW IT WORKS');?></span></span></h3>
                        <ul>
                        	<li><a class="modal" href="javascript:;" rel="{handler: 'adopt',adopt:'welcome', size: {x: 650, y: 375}}" title="It should read"><?php echo JText::_('WELCOME');?></a></li>
                            <li><a class="modal" href="javascript:;" rel="{handler: 'adopt',adopt:'tip', size: {x: 650, y: 375}}" title="TIPS for 1st time users"><?php echo JText::_('TIPS FOR FIRST TIME');?></a></li>
                            <li><a class="modal" href="javascript:;" rel="{handler: 'adopt',adopt:'guide', size: {x: 650, y: 375}}" title="Essential Guide"><?php echo JText::_('ESSENTIAL GUIDE');?></a></li>
                            <li class="last"><a class="modal" href="javascript:;" rel="{handler: 'adopt',adopt:'element', size: {x: 650, y: 375}}" title="Timescape Elements"><?php echo JText::_('TIMESCAPE ELEMENTS');?></a></li>                            
                        </ul>
                        <p class="coverImg">
                        	<img src="<?php echo $tmpTools->templateurl(); ?>/images/vita/visu_timescape_01.gif" alt=""/>
                        </p>
                        <a href="<?php echo $tmpTools->baseurl(); ?>doc/timescape_guide.pdf" title="<?php echo JText::_('DOWNLOAD PDF');?>" class="lnkDownload"><img src="<?php echo $tmpTools->templateurl(); ?>/images/vita/dummy.gif" alt="Download pdf instructions" class="uiIcon initIcon-10" /><span><?php echo JText::_('DOWNLOAD PDF');?></span></a>
                    </div><!--EOF blckHightlight-->                    
                </div><!--EOF leftCtn--> 
                <div class="middCtn">      	               
                    <div class="content">
                            <div class="innerContent"> 
                                <h2><span><span><?php echo JText::_('TIMESCAPE MAIN TITLE');?></span></span></h2>
                                <a href="javascript:;" title="Vita" class="lnkScreenShot"><img src="<?php echo $tmpTools->templateurl(); ?>/images/vita/visu_timescape_02.jpg" alt="Vita"/></a>                            
                            </div>                        
                    </div><!--EOF content-->
                    <div class="grpControl">
                       <a href="http://taylormade-elt.com/vita/timescape_course/bin/start.swf" target="_blank" title="Go" class="lnkGo initIcon-16">▶</a>
                    </div><!--EOF grpControl-->                   
                </div><!--EOF middCtn-->
                <div class="rightCtn-02">
                	<div class="blckHightlight">
                         <h3><span><span><?php echo JText::_('IMAGES_TIMESCAPE');?></span></span></h3>
                         <ul>
                         	<li class="first">
                            	<a href="javascript:;" title="<?php echo JText::_('EXCERCISE');?>"><img src="<?php echo $tmpTools->templateurl(); ?>/images/vita/visu_exercise.jpg" alt="exercise"/><span class="name"><?php echo JText::_('EXCERCISE');?></span></a>
                            </li>
                            <li>
                            	<a href="javascript:;" title="<?php echo JText::_('MASTER');?>"><img src="<?php echo $tmpTools->templateurl(); ?>/images/vita/visu_master.jpg" alt="master"/><span class="name"><?php echo JText::_('MASTER');?></span></a>
                            </li>
                            <li>
                            	<a href="javascript:;" title="<?php echo JText::_('TIMEWORLD');?>"><img src="<?php echo $tmpTools->templateurl(); ?>/images/vita/visu_timeworld.jpg" alt="Timeworld"/><span class="name"><?php echo JText::_('TIMEWORLD');?></span></a>
                            </li>
                            <li>
                            	<a href="javascript:;" title="<?php echo JText::_('TOOLS');?>"><img src="<?php echo $tmpTools->templateurl(); ?>/images/vita/visu_tools.jpg" alt="Tools"/><span class="name"><?php echo JText::_('TOOLS');?></span></a>
                            </li>                           
                         </ul>
                    </div><!--EOF blckHightlight-->                                  	                   
                </div><!--EOF rightCtn-->
        </div>
        <!-- END: CONTENT -->         
    </div><!-- EOF container-->
        <!--EOF footer-->    
	<!-- END: FOOTER -->    
</div><!--EOF wrapContainer    -->
<!-- BEGIN: FOOTER -->
<div id="footer">
            <hr/>
            <ul class="nav">
                <jdoc:include type="modules" name="user3" />
            </ul>
    </div>
    </div>
<jdoc:include type="modules" name="debug" />
<?php
$db =& JFactory::getDBO();
$query = 'SELECT a.* FROM #__content AS a INNER JOIN #__categories AS cc ON cc.id = a.catid WHERE a.alias="welcome" and cc.alias="timescape-page"';
$db->setQuery($query, 0, $count);
$rows = $db->loadObjectList();	
$welcome = $rows[0]; 

$query = 'SELECT a.* FROM #__content AS a INNER JOIN #__categories AS cc ON cc.id = a.catid WHERE a.alias="tip-for-1st-time-user" and cc.alias="timescape-page"';
$db->setQuery($query, 0, $count);
$rows = $db->loadObjectList();	
$tip = $rows[0];

$query = 'SELECT a.* FROM #__content AS a INNER JOIN #__categories AS cc ON cc.id = a.catid WHERE a.alias="enssetial-guide" and cc.alias="timescape-page"';
$db->setQuery($query, 0, $count);
$rows = $db->loadObjectList();	
$guide = $rows[0];

$query = 'SELECT a.* FROM #__content AS a INNER JOIN #__categories AS cc ON cc.id = a.catid WHERE a.alias="timescape-elements" and cc.alias="timescape-page"';
$db->setQuery($query, 0, $count);
$rows = $db->loadObjectList();	
$element = $rows[0];
?>
	<div style="display: none">
		<div id="welcome" class="contPopup fckDefault"><?php echo $welcome->introtext; ?></div>
		<div id="tip" class="contPopup fckDefault"><?php echo $tip->introtext; ?></div>
		<div id="guide" class="contPopup fckDefault"><?php echo $guide->introtext; ?></div>
		<div id="element" class="contPopup fckDefault"><?php echo $element->introtext; ?></div>
	</div>
</body>
</html>